#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>

int main() {
    double target;
    scanf("%lf", &target);
    double mother = 1.0;
    while (!(fabs(round(mother * target) - (mother * target)) <= FLT_EPSILON)) {
        // 精度在最小误差范围内
        mother++;
    }
    printf("%d/%d", (int)round(target * mother), (int)mother);
    return 0;
}